package day10.StreamTest.BufferedStream;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test1 {
    public static void main(String[] args) throws IOException {
        /*
        BOS -- FOS -- f5
         */

        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("/Users/hao/Desktop/abc/f5"));
        out.write(97);
        out.write(98);
        out.write(99);
        out.write(356);

        byte[] a = {
                101,102,103,104,105,
                106,107,108,109,110
        };
        out.write(a);
        out.flush();
        /*
        高级流的close()
        1. flush()
        2. 关闭相接的流
         */
        out.close();

    }
}
